package com.shen.pojo;

/**
 * Author:shen
 * CreateDate:2020/4/28.
 * Function:
 */
public class Scenic {
    private double price=100;//价格
    public void checkAge(Person person){
        if(person.getAge()<=14||person.getAge()>=80){
            System.out.println("免票");
        }
        else if(person.getAge()>14&&person.getAge()<=18){
            System.out.println("票价："+price/2);
        }else{
            System.out.println("票价:"+price);
        }

    }
}
